<?php
/**
 * @package      OWNServices
 * @subpackage   Site
 *
 * @author       Sanawin Tinsuwan	
 * @copyright    Copyright (C) 20014 Sanawin Tinsuwan. All rights reserved.
 * @license      http://www.gnu.org/licenses/gpl.html GNU/GPL, see LICENSE.txt
 */

defined('_JEXEC') or die();

// Set some global property
$document = JFactory::getDocument();

$document->addScript(JUri::base(true).'/media/com_ownservices/js/jquery.min.js');
$document->addScript(JUri::base(true).'/media/com_ownservices/js/bootstrap.min.js');
//$document->addScript(JUri::base(true).'/media/com_ownservices/js/jquery-ui.min.js');
//$document->addScript(JUri::base(true).'/media/com_ownservices/js/AdminLTE/app.js');
$document->addScript(JUri::base(true).'/media/system/js/core.js');

// Include dependancies
jimport('joomla.application.component.controller');
jimport('joomla.application.component.helper');

// Register backend helper class
JLoader::register('OwnservicesHelper', JPATH_ADMINISTRATOR . '/components/com_ownservices/helpers/ownservices.php');

$controller = JControllerLegacy::getInstance('OWNServices');
$controller->execute(JFactory::getApplication()->input->get('task', 'display'));
$controller->redirect();